package com.easywan.core;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.HashMap;
import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;

public class Config {
	public static HashMap<String,String> uuidMap = new HashMap<String, String>();
	private static Logger logger = Logger.getLogger(Config.class.getName());
	public static Properties properties;
	static{
		logger.setLevel(Level.INFO);
		properties = new Properties();
		String pPath = System.getProperty("catalina.base")+"/conf/dtools.properties";
		logger.info(pPath);
		try {
			properties.load(new FileReader(new File(pPath)));
		} catch (FileNotFoundException e) {
			//e.printStackTrace();
			logger.info("错误加载dtools");
		} catch (IOException e) {
			//e.printStackTrace();
			logger.info("错误加载dtools");
		}
	}
	public static String get(String key){
		return properties.getProperty(key);
	}
}
